IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'VirtualServerCreate')
	BEGIN
		DROP  Procedure  VirtualServerCreate
	END

GO

CREATE Procedure VirtualServerCreate
(
	@websiteId int,
	@accessFlags int,
	@authFlags int,
	@redirectFlags int,
	@virtualServerId int OUTPUT
)
AS

INSERT INTO VirtualServers
	(WebsiteId, AccessFlags, AuthFlags, RedirectFlags)
VALUES
	(@websiteId, @accessFlags, @authFlags, @redirectFlags)
	
SET @virtualServerId = SCOPE_IDENTITY()

GO